package com.xpalive.config.mybatis.toolkit;

import java.util.WeakHashMap;

public class ColMap<K, V> extends WeakHashMap<K, V> implements MyBatisQuery {

    public void putNotBlank(K key, V value) {
        if (isNotBlank(value)) {
            super.put(key, value);
        }
    }

    @SuppressWarnings("unchecked")
    public void putNotBlankLike(K key, V value) {
        if (isNotBlank(value)) {
            super.put(key, (V) ("%" + value + "%"));
        }
    }

}
